package com.changgou.goods.feign;

import com.changgou.entity.PageResult;
import com.changgou.entity.Result;
import com.changgou.goods.pojo.Brand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

@FeignClient(name = "goods")
public interface BrandFeign {

    @GetMapping("/brand")
    public Result<List<Brand>> findAll();

    @PostMapping("/brand/search/{page}/{size}" )
    public Result<PageResult> findPage(@RequestParam Map searchMap, @PathVariable("page") int page, @PathVariable("size")  int size);

    @PostMapping("/brand")
    public Result add(@RequestBody Brand brand);

    @PutMapping("/brand/{id}")
    public Result update(@RequestBody Brand brand,@PathVariable("id") Integer id);

    @DeleteMapping("/brand/{id}" )
    public Result delete(@PathVariable("id") Integer id);


}
